<!-- 村列表中的区域筛选 -->
<div class="col-md-10">
    <form id="searchForm" action="{:url('admin/villages/index')}" class="form" method="post">
        <div class="form-inline">
            {if condition="($admin->type == 3) OR ($admin->type == 6) OR ($admin->type == 4)"}
            {$selectarea['cityname']}->{$selectarea['xianname']}->{$selectarea['townname']}
            {elseif condition="($admin->type == 2)"}
            {$selectarea['cityname']}->{$selectarea['xianname']}
            <select id="town" name="townId" class="form-control" data-hasvillage="on" ></select>
            {elseif condition="($admin->type == 1)"}
            {$selectarea['cityname']}
            <select id="xian" name="xianId" class="form-control" ></select>
            <select id="town" name="townId" class="form-control" data-hasvillage="on" ></select>
            {else/}
            <select id="city" name="cityId" class="form-control" ></select>
            <select id="xian" name="xianId" class="form-control" ></select>
            <select id="town" name="townId" class="form-control" data-hasvillage="on" ></select>
            {/if}

            <input type="hidden" class="form-control city" name="city" value="">
            <input type="hidden" class="form-control xian" name="xian" value="">
            <input type="hidden" class="form-control town" name="town" value="">

            <input type="text" class="form-control hide" value="阻止回车键提交">
            {if condition="($admin->type < 3) "}
            <button id="doSearch" type="button" class="btn btn-success" title="筛选">
                <i class="fa fa-search"></i> 筛选
            </button>
            <!--<a href="{$currentUrl}?reset=1" class="btn btn-danger"><i class="fa fa-trash"></i> 清空</a>-->
            <button type="reset" class="btn btn-danger" title="清空">
                <i class="fa fa-trash"></i> 清空
            </button>
            {/if}
        </div>
    </form>
</div>

<input type="hidden" class="getregion_url" value="{:url('admin/region/getregion')}">
<input type="hidden" class="getvillage_url" value="{:url('admin/region/getvillage')}">
<input type="hidden" class="adminType" value="{$admin.type}">
<input type="hidden" class="adminCity" value="{$admin.cityId}">
<input type="hidden" class="adminXian" value="{$admin.xianId}">
<input type="hidden" class="adminTown" value="{$admin.townId}">
<input type="hidden" class="adminVillage" value="{$admin.villageId}">

<script src="__STATIC__/admin/pages/js/searcharea.js" type="text/javascript"></script>